Using Microsoft Azure DocumentDB in a Node.js Application by Bush Eric

Using Microsoft Azure DocumentDB in a Node.js Application by Bush Eric

Author:Bush, Eric [Bush, Eric]
Language: eng
Format: azw3
Publisher: RedSky Productions, LLC
Published: 2016-09-07T16:00:00+00:00


Figure 16: Index and Customer document linking

Implementing a good index can be a critical part of your work to maximize the efficiency of your queries. It is well worth your time to measure and analyze the performance of your database and to fine-tune it.

Performance considerations

The performance cost for DocumentDB access is measured in request units for each interaction you have. Microsoft has defined a single request unit as the processing required to read a single 1KB JSON document that has 10 unique property values in it with the consistency level set to “Session” and using automatic indexing.

Each response from DocumentDB includes a custom header named “x-ms-request-charge” that contains the amount of request units consumed. You can get that information programmatically with DocumentDB as part of the response object.

The obvious thing that impacts the number of request units is the size of the documents and the number of properties they have. Your indexing policy also impacts the consumption of request units, and thus, the throughput that you can achieve. There is extra storage used up with every index. To reduce the overhead, you can limit the number of indexed properties. You could even turn off indexing completely on some documents.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.